package cn.stylefeng.guns.modular.tool.mapper;

import cn.stylefeng.guns.modular.tool.entity.ToolStorageStock;
import cn.stylefeng.guns.modular.tool.model.params.ToolStorageStockParam;
import cn.stylefeng.guns.modular.tool.model.result.ToolStorageStockResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 云仓库存表 Mapper 接口
 * </p>
 *
 * @author zhucx
 * @since 2023-04-01
 */
public interface ToolStorageStockMapper extends BaseMapper<ToolStorageStock> {

    /**
     * 获取列表
     *
     * @author zhucx
     * @Date 2023-04-01
     */
    List<ToolStorageStockResult> customList(@Param("paramCondition") ToolStorageStockParam paramCondition);

    /**
     * 获取map列表
     *
     * @author zhucx
     * @Date 2023-04-01
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") ToolStorageStockParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author zhucx
     * @Date 2023-04-01
     */
    Page<ToolStorageStockResult> customPageList(@Param("page") Page page, @Param("paramCondition") ToolStorageStockParam paramCondition, @Param("condition") String condition
    		,@Param("operateId")Long operateId);

    /**
     * 获取分页map列表
     *
     * @author zhucx
     * @Date 2023-04-01
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") ToolStorageStockParam paramCondition);

	ToolStorageStockResult findBySpec(@Param("paramCondition")ToolStorageStockParam param);

	List<ToolStorageStockResult> findListBySpec(@Param("paramCondition")ToolStorageStockParam param);

	boolean batchAddList(@Param("ssPlist")List<ToolStorageStockParam> ssPlist);

	void deleteBySpec(@Param("paramCondition")ToolStorageStockParam deleteStockParam);

	ToolStorageStockResult findTotalBySpec(@Param("paramCondition")ToolStorageStockParam toolStorageStockParam);

	List<ToolStorageStockResult> findGoodsListBySpec(@Param("paramCondition")ToolStorageStockParam toolStorageStockParam);

}
